package coco.mogodb.com.module.drug.respon;


import coco.mogodb.com.module.drug.entity.PharmacyDrugs;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public interface PharmacyDrugsRepository extends MongoRepository<PharmacyDrugs, String> {
    
    /**
     * 根据描述查询
     * 分页查询
     */
    Page<PharmacyDrugs> findByName(String name, Pageable pageable);

    /**
     * 根据创建日期范围查询 分页查询
     */
    Page<PharmacyDrugs> findByCreateTimeBetween(Date startTime, Date endTime, Pageable pageable);
}